<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Contracts\Auth\Guard;

use Illuminate\Support\Facades\Log;

class LogMiddleware
{

    public function __construct()
    {
    }

    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        $inputs = \MyUtils::extractInput($request);
        Log::info("请求参数：" . json_encode($inputs, JSON_UNESCAPED_UNICODE));

        $response = $next($request);

//        Log::info("响应结果：" . $response);


        return $response;

    }
}
